package com.lms.common.file.api.client;

import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(name = "lms-common-file")
public interface FileClient {
    @PostMapping(value = "/file/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    String upload(
            @RequestPart("file") MultipartFile uploadFile,
            @RequestParam("businessId") String businessId,
            @RequestParam("businessType") String businessType,
            @RequestParam("businessColumn") String businessColumn);

    @GetMapping("/file/download")
    Response download();
}
